﻿using System.Collections.Generic;
using Core.Library;

namespace DataObject.Online
{
    public class OnlineController
    {
        public static void Online_Create(OnlineObject o)
        {
            OnlineDAL.Online_Create(o);
        }

        public static void Online_Update(OnlineObject o)
        {
            OnlineDAL.Online_Update(o);
        }

        public static void Online_Delete(int onlineId)
        {
            OnlineDAL.Online_Delete(onlineId);
        }

        public static OnlineObject Online_GetById(int onlineId)
        {
            return ObjectHelper.FillObject<OnlineObject>(OnlineDAL.Online_GetById(onlineId));
        }

        public static List<OnlineObject> Online_GetByTypeId(int typeId)
        {
            return ObjectHelper.FillCollection<OnlineObject>(OnlineDAL.Online_GetByTypeId(typeId));
        }
    }
}
